package peer.rudp.command;

public class GetDBCOM2 extends Command{
	int groupDataLength;
	public GetDBCOM2(int groupDataLength){
		this.groupDataLength=groupDataLength;
		data=new byte[6];
		commandType=peer.tools.CommandType.command_GetDBCOM2;
		peer.tools.ByteShortSwitch.toByteArray(commandType, data, 0);
		peer.tools.ByteIntSwitch.toByteArray(groupDataLength, data, 2);
	}
	
	public GetDBCOM2(byte[] data){
		this.data=data;
		commandType=peer.tools.ByteShortSwitch.toShort(data, 0);
		groupDataLength=peer.tools.ByteIntSwitch.toInt(data, 2);
	}
	
	public int getGroupDataLength(){
		return groupDataLength;
	}
	
}
